package com.mark.mall.web.platform.controller;


import com.mark.mall.web.platform.dto.param.MakeOrderParam;
import com.mark.mall.common.resultBean.R;
import com.mark.mall.web.platform.service.OrderService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * <p>
 * 销售单表 前端控制器
 * </p>
 *
 * @author admin
 * @since 2021-03-03
 */
@RestController
@RequestMapping("/web/order")
@Api(tags = "前台销售单模块")
@RequiredArgsConstructor
public class OrderController {

    private final OrderService orderService;

    @PostMapping("makeOrder")
    public R<Boolean> makeOrder(@RequestBody @Valid MakeOrderParam param) {
        return orderService.makeOrder(param);
    }
}
